<?php

use swap\visitor;

class admin_lefter_helper extends \swap\helper {
	
	public static function run() {
		
		$action_name = visitor::get_action_name(); 
		
		$lefter_tab = array(
			array('title' => '站点信息', 'url' => 'admin-setting/basic', 'show_tabon' => self::show_tabon($action_name, 'basic')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
			array('title' => '注册与访问控制', 'url' => 'admin-setting/access', 'show_tabon' => self::show_tabon($action_name, 'access')),
		);
		
		self::set('lefter_tab', $lefter_tab);
		
		self::render();
		
	}
	
	public static function show_tabon($action_name, $needle) {
		$show = false;
		
		if ($action_name === $needle) {
			$show = true;
		}
		
		return $show;
	}
	
}